package com.hospital.phyexam.dao;

import com.hospital.phyexam.entity.Student;
import com.hospital.phyexam.entity.StudentExample;

import java.util.List;

import com.hospital.phyexam.entity.StudentVo;
import org.apache.ibatis.annotations.Param;

public interface StudentMapper {
    /**
     * 通过id查找学生
     *
     * @param id
     * @return
     */
    Student findStuById(Integer id);

    /**
     * 通过学号查找学生
     *
     * @param num
     * @return
     */
    Student findStuByNum(@Param("num") String num);

    /**
     * 查找所有学生
     *
     * @return
     */
    List<Student> findAllStu();

    StudentVo findStuAndDeptByNum(@Param("num") String num);

    long countByExample(StudentExample example);

    int deleteByExample(StudentExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Student record);

    int insertSelective(Student record);

    List<Student> selectByExample(StudentExample example);

    Student selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Student record, @Param("example") StudentExample example);

    int updateByExample(@Param("record") Student record, @Param("example") StudentExample example);

    int updateByPrimaryKeySelective(Student record);

    int updateByPrimaryKey(Student record);
}